/**
 * @author admin
 * 1920. 基于排列构建数组
 */
public class LeeCode1920 {


    public int[] buildArray(int[] nums) {

        int []res = new int[nums.length];

        for (int i = 0; i < nums.length; i++) {
            res[i] = nums[nums[i]];
        }

        return res;
    }

    public static void main(String[] args) {

        System.out.println(new LeeCode1920().buildArray(new int[]{0,2,1,5,3,4}));
    }
}
